package com.skyable.auth.feign.impl;

import com.skyable.auth.feign.ThirdFeignApi;
import com.skyable.common.common.ResponseResult;
import com.skyable.common.constants.exception.CommonExcpConstants;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.Map;

/**
 * @author GaoYuan
 * @title: AuthFeignApiFallBack
 * @projectName spring-cloud-demo
 * @description: TODO
 * @date 2021/3/2823:51
 */
@Slf4j
@Component
public class ThirdFeignApiFallBack implements ThirdFeignApi {


    @Override
    public ResponseResult sendCode(Map<String, String> params) {
        log.error("feign request method sendCode occur error");
        return ResponseResult.error(CommonExcpConstants.ERROR_CODE_REQUEST_FEIGN,CommonExcpConstants.ERROR_MSG_REQUEST_FEIGN);
    }

    @Override
    public ResponseResult sendPass(Map<String, String> params) {
        log.error("feign request method sendPass occur error");
        return ResponseResult.error(CommonExcpConstants.ERROR_CODE_REQUEST_FEIGN,CommonExcpConstants.ERROR_MSG_REQUEST_FEIGN);
    }

    @Override
    public ResponseResult sendDeny(Map<String, String> params) {
        log.error("feign request method sendDeny occur error");
        return ResponseResult.error(CommonExcpConstants.ERROR_CODE_REQUEST_FEIGN,CommonExcpConstants.ERROR_MSG_REQUEST_FEIGN);
    }
}
